home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / ldapjdk.jar / netscape / ldap / client / opers / JDAPSearchResultReference.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-13  |  1.5 KB  |  55 lines

  1. package netscape.ldap.client.opers;
  2.  
  3. import java.io.IOException;
  4. import netscape.ldap.ber.stream.BERConstruct;
  5. import netscape.ldap.ber.stream.BERElement;
  6. import netscape.ldap.ber.stream.BEROctetString;
  7. import netscape.ldap.ber.stream.BERSequence;
  8. import netscape.ldap.ber.stream.BERTag;
  9.  
  10. public class JDAPSearchResultReference implements JDAPProtocolOp {
  11.    protected String[] m_urls;
  12.    protected BERElement m_element;
  13.  
  14.    public JDAPSearchResultReference(BERElement var1) throws IOException {
  15.       this.m_element = var1;
  16.       BERSequence var2 = (BERSequence)((BERTag)var1).getValue();
  17.       if (((BERConstruct)var2).size() >= 0) {
  18.          this.m_urls = new String[((BERConstruct)var2).size()];
  19.  
  20.          for(int var3 = 0; var3 < ((BERConstruct)var2).size(); ++var3) {
  21.             BEROctetString var4 = (BEROctetString)((BERConstruct)var2).elementAt(var3);
  22.             this.m_urls[var3] = new String(var4.getValue(), "UTF8");
  23.          }
  24.  
  25.       }
  26.    }
  27.  
  28.    public int getType() {
  29.       return 19;
  30.    }
  31.  
  32.    public BERElement getBERElement() {
  33.       return this.m_element;
  34.    }
  35.  
  36.    public String[] getUrls() {
  37.       return this.m_urls;
  38.    }
  39.  
  40.    public String toString() {
  41.       String var1 = "";
  42.       if (this.m_urls != null) {
  43.          for(int var2 = 0; var2 < this.m_urls.length; ++var2) {
  44.             if (var2 != 0) {
  45.                var1 = var1 + ",";
  46.             }
  47.  
  48.             var1 = var1 + this.m_urls[var2];
  49.          }
  50.       }
  51.  
  52.       return "SearchResultReference " + var1;
  53.    }
  54. }
  55.